﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="RecipeDetails.aspx.vb" Inherits="WSCC_GlutenfreeKent.RecipeDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="RecipeDetailsDS" Width="917px">
            <Columns>
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:ImageField DataImageUrlField="Photo" HeaderText="Photo">
                </asp:ImageField>
                <asp:BoundField DataField="FullRecipe" HeaderText="FullRecipe" 
                    SortExpression="FullRecipe" />
                <asp:BoundField DataField="UserName" HeaderText="UserName" 
                    SortExpression="UserName" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="RecipeDetailsDS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionStringRestaurants %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionStringRestaurants.ProviderName %>" 
            SelectCommand="SELECT [UserName], [Photo], [FullRecipe], [Title] FROM [RecipesListView] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            Width="915px">
            <Columns>
                <asp:BoundField DataField="Comment_title" 
                    HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" 
                    SortExpression="Comment" />
               <asp:BoundField DataField="RecipeComments.Rating" HeaderText="Rating"
                SortExpression="Rating" />
                <asp:BoundField DataField="UserName" HeaderText="UserName" 
                    SortExpression="UserName" />
                <asp:BoundField DataField="aspnet_Users.Rating" HeaderText="User Rating" 
                    SortExpression="Users.Rating" />
            </Columns>
        </asp:GridView>
    </p>
    <p>
        Add your comment:</p>
    <p>
        Comment title:
        <asp:TextBox ID="tb_CommentTitle" runat="server"></asp:TextBox>
    </p>
    <p>
        Comment:
        <asp:TextBox ID="tb_Comment" runat="server" Height="61px" TextMode="MultiLine" 
            Width="294px"></asp:TextBox>
    </p>
    <p>
        Rating: 
        <asp:RadioButtonList ID="rbl_Rating" runat="server" 
            RepeatDirection="Horizontal" RepeatLayout="Flow">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
            <asp:ListItem>3</asp:ListItem>
            <asp:ListItem>4</asp:ListItem>
            <asp:ListItem>5</asp:ListItem>
        </asp:RadioButtonList>
    </p>
    <asp:Button ID="btn_submit" runat="server" Text="Submit your comment" />
    <br />
    <br />
    <br />
    Tag the recipe<br />
    <asp:CheckBoxList ID="cbl_Tags" runat="server" DataSourceID="RecipeTagDS" 
        DataTextField="Tag" DataValueField="ID" RepeatDirection="Horizontal">
    </asp:CheckBoxList>
    <asp:SqlDataSource ID="RecipeTagDS" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionStringRestaurants %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionStringRestaurants.ProviderName %>" 
        SelectCommand="SELECT * FROM [TagsRecipes]"></asp:SqlDataSource>
    Add in your own tag(s) here, separate tags using commas:<br />
    <br />
    <asp:TextBox ID="tb_tags" runat="server"></asp:TextBox>
    <br />
    <asp:Button ID="btn_Tag" runat="server" Text="Tag this recipe" />
    <br />
</asp:Content>
